package com.woniuxy.controller;

import com.woniuxy.entity.dto.AddressManagementDTO;
import com.woniuxy.entity.dto.GoodsManagementDTO;
import com.woniuxy.service.AddressManagementService;
import com.woniuxy.util.PageData;
import com.woniuxy.util.ResponseData;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/address")
public class AddressManagementController {

    @Resource
    private AddressManagementService addressManagementService;
    @PostMapping("/queryCustomerAddress")
    public ResponseData<?> queryCustomerAddress(@RequestBody PageData<AddressManagementDTO> pageData) {
        return addressManagementService.queryCustomerAddress(pageData);
    }


    @PostMapping("/saveUpdateCustomerAddress")
    public ResponseData<?> saveUpdateCustomerAddress(@RequestBody AddressManagementDTO addressManagementDTO) {
        return addressManagementService.updateCustomerAddress(addressManagementDTO);
    }
}
